import request from '@/utils/request'

// 查询订单详情列表
export function listOrderDetail(query) {
    return request({
        url: '/orderDetail/list',
        method: 'get',
        params: query
    })
}

// 查询订单详情详细
export function getOrderDetail(orderNo) {
    return request({
        url: '/orderDetail/' + orderNo,
        method: 'get'
    })
}

// 订单变更查看详细订单信息
export function getChangeOrderDetail(orderNo) {
    return request({
        url: '/orderDetail/change/orderDetail',
        method: 'post',
        data: orderNo
    })
}

// 新增订单详情
export function addOrderDetail(data) {
    return request({
        url: '/orderDetail',
        method: 'post',
        data: data
    })
}

// 修改订单详情
export function updateOrderDetail(data) {
    return request({
        url: '/orderDetail/operator',
        method: 'put',
        data: data
    })
}

// 修改订单详情列表
export function updateOrderDetailList(data) {
    return request({
        url: '/orderDetail/operator',
        method: 'put',
        data: data
    })
}

// 删除订单详情
export function delOrderDetail(orderNo) {
    return request({
        url: '/orderDetail/' + orderNo,
        method: 'delete'
    })
}